package com.zhanglifan.service.impl;

import com.github.pagehelper.PageHelper;
import com.zhanglifan.mapper.ItemCatMapper;
import com.zhanglifan.pojo.ItemCat;
import com.zhanglifan.service.ItemCatService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * Information
 * Author: ZhangLifan
 * Time: 2017/11/7 10:14
 * Description:
 */
@Service
@Transactional
public class ItemCatServiceImpl implements ItemCatService {

    @Resource
    private ItemCatMapper itemCatMapper;

    @Override
    public List<ItemCat> queryItemCatByPage(int pageNum,int pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        List<ItemCat> itemCats = itemCatMapper.queryItemCatByPage();
        return itemCats;
    }
}
